﻿
Imports osi.root.connector

Public Class reverse(Of T)
    Inherits pointer(Of T)
    Implements IComparable(Of reverse(Of T))

    Public Sub New()
        MyBase.New()
    End Sub

    Public Sub New(ByVal i As T)
        MyBase.New(i)
    End Sub

    Public Sub New(ByVal i As _pointer(Of T))
        MyBase.New(i)
    End Sub

    Protected NotOverridable Overrides Function compare(ByVal i As T, ByVal j As T) As Int32
        Return -MyBase.compare(i, j)
    End Function

    Public Overloads Function CompareTo(ByVal other As reverse(Of T)) As Int32 _
                                       Implements IComparable(Of reverse(Of T)).CompareTo
        Return MyBase.CompareTo(other)
    End Function
End Class
